package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MemberMapper;
import com.itheima.pojo.Member;
import com.itheima.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @outhor
 * @date 2020/2/6 15:31
 */

@Service(interfaceClass = MemberService.class)
@Transactional
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberMapper memberMapper;


    @Override
    public Member findByTelephone(String telephone) {
        return memberMapper.findBytelephone(telephone);
    }

    @Override
    public Member add(Member member) {
        memberMapper.add(member);
        return member;
    }

    @Override
    public List<Member> getFamily(Integer id) {
        return memberMapper.getFamily(id);
    }
}
